package com.indusfo.spc.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.indusfo.spc.common.pojo.BasePojo;

import javax.persistence.Transient;
import java.util.Date;
import java.util.List;

public class Batch extends BasePojo {
    // 任务批号ID
    private Integer batchId;
    // 生产计划单ID  planId
    private Integer orderId;
    // 打印状态  printingState
    private Integer printStateId;
    // 批次状态  productionState(1.未完工，2，已完工，3.待投产)
    private Integer productStateId;
    // 批次编号
    private String batchCode;
    // 创建人
    private Integer userId;
    // 班次ID   classId
    private Integer classeId;
    // 工位ID   staId
    private Integer stationId;
    // 维修次数
    private Integer repairCount;
    // 日期
    private Date createTime;
    // 备注
    private String remark;
    // 数据状态
    private Integer dataState;
    // 工艺版本
    private Integer orderTechId;

    private Integer orderFlowId;

    private Integer orderFlowStateId;

    private Integer endStationId;

    private Integer endClasseId;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endClasseDate;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createDate;
    /**
     * 修改时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date modifyDate;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date  productDate;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date  finshDate;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date  classeDate;

    // 批次数量
    private Integer batchNum;
    // 已投产数量
    private Integer productionNum;
    // 打印状态翻译
    private String printStateName;
    // 批次状态翻译
    private String productionStateName;
    // 数据状态翻译
    private String dataStateName;
    // 任务单号
    private String orderNo;
    // 物料编号
    private String matCode;
    // 物料名称
    private String matName;
    // 物料型号
    private String matModel;
    // 工艺版本
    private String matVerName;
    // 生产车间
    private String workshopName;
    // 产线名称
    private String productlineName;
    // 计划数量
    private Integer planNum;
    // 订单类型
    private String orderTypeName;

    @Transient
    private String palletCode;


    public Integer getOrderTechId() {
        return orderTechId;
    }

    public void setOrderTechId(Integer orderTechId) {
        this.orderTechId = orderTechId;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public String getMatCode() {
        return matCode;
    }

    public void setMatCode(String matCode) {
        this.matCode = matCode;
    }

    public String getMatName() {
        return matName;
    }

    public void setMatName(String matName) {
        this.matName = matName;
    }

    public String getMatModel() {
        return matModel;
    }

    public void setMatModel(String matModel) {
        this.matModel = matModel;
    }

    public String getMatVerName() {
        return matVerName;
    }

    public void setMatVerName(String matVerName) {
        this.matVerName = matVerName;
    }

    public String getWorkshopName() {
        return workshopName;
    }

    public void setWorkshopName(String workshopName) {
        this.workshopName = workshopName;
    }

    public String getProductlineName() {
        return productlineName;
    }

    public void setProductlineName(String productlineName) {
        this.productlineName = productlineName;
    }

    public Integer getPlanNum() {
        return planNum;
    }

    public void setPlanNum(Integer planNum) {
        this.planNum = planNum;
    }

    public String getOrderTypeName() {
        return orderTypeName;
    }

    public void setOrderTypeName(String orderTypeName) {
        this.orderTypeName = orderTypeName;
    }

    /**
     * 批次工序流程集合
     */
    private List<BatchFlow> batchFlowList;

    /**
     * 批次维修流程集合
     */
    private List<BatchRepair> batchRepairList;

    public Integer getBatchId() {
        return batchId;
    }

    public void setBatchId(Integer batchId) {
        this.batchId = batchId;
    }

    public Integer getOrderId() {
        return orderId;
    }

    public void setOrderId(Integer orderId) {
        this.orderId = orderId;
    }

    public Integer getPrintStateId() {
        return printStateId;
    }

    public void setPrintStateId(Integer printStateId) {
        this.printStateId = printStateId;
    }

    public Integer getProductStateId() {
        return productStateId;
    }

    public void setProductStateId(Integer productStateId) {
        this.productStateId = productStateId;
    }

    public String getPrintStateName() {
        return printStateName;
    }

    public void setPrintStateName(String printStateName) {
        this.printStateName = printStateName;
    }

    public String getProductionStateName() {
        return productionStateName;
    }

    public void setProductionStateName(String productionStateName) {
        this.productionStateName = productionStateName;
    }

    public String getBatchCode() {
        return batchCode;
    }

    public void setBatchCode(String batchCode) {
        this.batchCode = batchCode == null ? null : batchCode.trim().replace(" ","");
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getClasseId() {
        return classeId;
    }

    public void setClasseId(Integer classeId) {
        this.classeId = classeId;
    }

    public Integer getStationId() {
        return stationId;
    }

    public void setStationId(Integer stationId) {
        this.stationId = stationId;
    }

    public Integer getRepairCount() {
        return repairCount;
    }

    public void setRepairCount(Integer repairCount) {
        this.repairCount = repairCount;
    }

    public Integer getBatchNum() {
        return batchNum;
    }

    public void setBatchNum(Integer batchNum) {
        this.batchNum = batchNum;
    }

    public Integer getProductionNum() {
        return productionNum;
    }

    public void setProductionNum(Integer productionNum) {
        this.productionNum = productionNum;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark== null ? null : remark.trim().replace(" ","");
    }

    public Integer getDataState() {
        return dataState;
    }

    public void setDataState(Integer dataState) {
        this.dataState = dataState;
    }

    public String getDataStateName() {
        return dataStateName;
    }

    public void setDataStateName(String dataStateName) {
        this.dataStateName = dataStateName;
    }

    public List<BatchFlow> getBatchFlowList() {
        return batchFlowList;
    }

    public void setBatchFlowList(List<BatchFlow> batchFlowList) {
        this.batchFlowList = batchFlowList;
    }

    public List<BatchRepair> getBatchRepairList() {
        return batchRepairList;
    }

    public void setBatchRepairList(List<BatchRepair> batchRepairList) {
        this.batchRepairList = batchRepairList;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Date getModifyDate() {
        return modifyDate;
    }

    public void setModifyDate(Date modifyDate) {
        this.modifyDate = modifyDate;
    }

    public Integer getOrderFlowId() {
        return orderFlowId;
    }

    public void setOrderFlowId(Integer orderFlowId) {
        this.orderFlowId = orderFlowId;
    }

    public Integer getOrderFlowStateId() {
        return orderFlowStateId;
    }

    public void setOrderFlowStateId(Integer orderFlowStateId) {
        this.orderFlowStateId = orderFlowStateId;
    }

    public Date getProductDate() {
        return productDate;
    }

    public void setProductDate(Date productDate) {
        this.productDate = productDate;
    }

    public Date getFinshDate() {
        return finshDate;
    }

    public void setFinshDate(Date finshDate) {
        this.finshDate = finshDate;
    }

    public Date getClasseDate() {
        return classeDate;
    }

    public void setClasseDate(Date classeDate) {
        this.classeDate = classeDate;
    }

    public String getPalletCode() {
        return palletCode;
    }

    public void setPalletCode(String palletCode) {
        this.palletCode = palletCode;
    }

    public Integer getEndStationId() {
        return endStationId;
    }

    public void setEndStationId(Integer endStationId) {
        this.endStationId = endStationId;
    }

    public Integer getEndClasseId() {
        return endClasseId;
    }

    public void setEndClasseId(Integer endClasseId) {
        this.endClasseId = endClasseId;
    }

    public Date getEndClasseDate() {
        return endClasseDate;
    }

    public void setEndClasseDate(Date endClasseDate) {
        this.endClasseDate = endClasseDate;
    }
}
